package br.com.teste.manager;

import java.io.Serializable;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public abstract class AbstractTesteManager implements Serializable {

    private static final long serialVersionUID = 1L;

    protected final Logger logger = LoggerFactory.getLogger(getClass());

    protected static final long LIST_MAX = 200;

    @PersistenceContext
    private EntityManager entityManager;

    @Transactional(propagation= Propagation.MANDATORY)
    protected EntityManager getEntityManager() {
        return entityManager;
    }

}
